<?php

namespace Extend\UFile\library;

require(ROOT_PATH . '/extend/UFile/library/sdk/proxy.php');

class UFile
{
    public static function putFile($bucket, $path, $file)
    {
        return UCloud_PutFile($bucket, $path, $file);
    }

    public static function deleteFile($bucket, $path)
    {
        return UCloud_Delete($bucket, $path);
    }

    public static function getFile($bucket, $path, $public = true, $expires = 0)
    {
        if ($public) {
            return UCloud_MakePublicUrl($bucket, $path);
        } else {
            return UCloud_MakePrivateUrl($bucket, $path, $expires);
        }
    }

    
}
